<script setup>
import { reactive } from "vue";
import { getQuestion } from "../api/index";
import QuestionBox from "./QuestionBox.vue";
import QuestionItem from "./QuestionItem.vue";

const questionItem = reactive([]);

getQuestion({
  pagenum:2
}).then(res=>{
  questionItem.push(...res.data.data.list);
});
</script>

<template>
  <div class="homeBox">
    <QuestionBox>
      <QuestionItem v-for="item in questionItem" :value="item" :key="item.id" @click=" $router.push('/detail/'+item.id) " />
    </QuestionBox>
  </div>
</template>
